import java.rmi.Naming;
import java.rmi.RMISecurityManager;
import java.util.Calendar;


public class testClient 
{
	public static void main (String[] argv) 
	{
		try 
		{
			if (System.getSecurityManager() == null) 
			{
				System.setSecurityManager(new RMISecurityManager());
			}

			CentralServerInterface xStub = (CentralServerInterface) Naming.lookup ("//localhost/CentralServer");
			boolean xIsReader = Boolean.parseBoolean(argv[0]);
			int xPriority = Integer.parseInt(argv[1]);
			long xFileSize = 16384;
			System.out.println(xStub.mGetServers("A",xFileSize,xPriority,xIsReader));
			System.out.println(xStub.mGetServers("A",16384, xPriority,true ));
			//boolean xIsReader = Boolean.parseBoolean(argv[0]);
			//int xPriority = Integer.parseInt(argv[1]);
			System.out.println(xStub.mIsLocked("A", xIsReader, xPriority));

		} 
		catch (Exception e) 
		{
			System.out.println ("Client exception: " + e);
		}
	}

}
